n,m=map(int,input().split())
l=[]
for i in range(n):
l.append(list(input()))
if n % 2 != 0:
print(n)
else:
start=n
mid = n//2
while start != 1:
if l[0:mid][::-1] == l[mid:start]:
start//=2
mid=start//2
else:
break
print(start)
Teddy and Tweety | Partitioning binary strings |
Special sets | Smallest chosen word |
Going to office | Color the boxes |
Missing numbers | Maximum sum |
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |
Duration | Birthday Party |
e-maze-in | Bricks Game |